public class Test {
    public static void main(String[] args) {
       BinaryTree binaryTree= new BinaryTree();
       BinaryTree.TreeNode root=binaryTree.createTree();
        System.out.println("前序遍历的结果：");
       binaryTree.preOrder(root);
        System.out.println();
        System.out.println("中序遍历的结果：");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.println("后序遍历的结果：");
        binaryTree.postOrder(root);
        System.out.println();
        binaryTree.size(root);
        System.out.println("节点个数："+binaryTree.nodeSize);
        int ret=binaryTree.size2(root);
        System.out.println("结点个数为："+ret);
       binaryTree.getLeafNodeCount1(root);
        System.out.println("叶子节点个数为："+binaryTree.leafSize);
        int leaRet=binaryTree.getLeafNodeCount2(root);
        System.out.println("叶子节点个数为"+leaRet);
       int ret2= binaryTree.getKLevelNodeCount(root,2);
        System.out.println(ret2);
        int height=binaryTree.getHeight(root);
        System.out.println("树的高度："+height);
        BinaryTree.TreeNode ret3=binaryTree.find(root,'D');
        System.out.println(ret3);
        System.out.println("层序遍历的结果：");
        binaryTree.levelOrder(root);
        System.out.println();
        boolean flg=binaryTree.isCompleteTree(root);
        System.out.println(flg);
    }
}
